<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.boxin.ims.modules.wechat.entity.Product" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=0">
<title>会员中心</title>
<link href="${ctxStatic }/site/themes/default/css/boilerplate.css" rel="stylesheet" type="text/css">
<link href="${ctxStatic }/site/themes/default/css/css.css" rel="stylesheet" type="text/css">
<script src="${ctxStatic }/site/themes/default/js/respond.min.js"></script>
<script src="${ctxStatic }/site/themes/default/js/jQuery.js"></script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script src="${ctxStatic}/site/themes/default/js/hideOptionMenu.js" type="text/javascript"></script>

<style type="text/css">
.photo{
	display:inline-block;
	background-color:#FFF;
	margin-top:10px;
	margin-bottom:10px;
	border:1px #3b9b06 solid;
	 padding:3px;
	 position:absolute;
	 top:15%;
	 left:10%;
	 border-radius:5px;
	 box-shadow:0px 0px 2px #3b9b06;
}
.text{
	position:absolute;
	top:28%;
	left:35%;
	font-size:14px;
	line-height:15px;
	color:#FFFFFF;
	font-weight:bolder;
	text-shadow:1px 0px 1px #537e02;
}

.icon_fanlijifen:before {
	font: 28px 'ElegantIcons';
	content: "\e0c1";
	color: #00CC66;
	float: left;
	margin-top: -2px;
	padding-left: 3%;
}
.icon_xinyongjifen:before {
	font: 28px 'ElegantIcons';
	content: "\e0ca";
	color: #f34;
	float: left;
	margin-top: -2px;
	padding-left: 3%;
}
.icon_woyaotuiguang:before {
	font: 28px 'ElegantIcons';
	content: "\e0c2";
	color: #FF6600;
	float: left;
	margin-top: -2px;
	padding-left: 3%;
}
.icon_guize:before {
	font: 28px 'ElegantIcons';
	content: "\e0c9";
	color: #9966FF;
	float: left;
	margin-top: -2px;
	padding-left: 3%;
}
.jifen {
	width: 100%;
	background: rgba(0, 0, 0, 0.75) !important;
	background: #000;
	filter: Alpha(opacity=35);
	height: 40px;
	position: absolute;
	bottom: 0;
	color: #FFF;
	width:100%;
}
.jifen ul{
	width:100%;
}
.jifen li{
	display:inline-block;
	width:27%;
	font-size:12px;
	border-right:1px #999 solid;
	height:28px;
	text-align:center;
	padding:1.5% 2% ;
	line-height:17px;
}
.jinfen li p{
margin-top:2px;
}
.divcont{
position: absolute;
top:0;
text-align:center;
}
.f13{
font-size:13px;}

#guize table{
	border-collapse: collapse;
	width:100%;
	border:0;
	text-align:center;
}
#guize tr{
	border:0;
	background-color:#fff;
}
#guize td{
	font-size:13px;
		border:1px #ccc solid;
	height:25px;
	line-height:25px;
}
#guize th{
	border:1px #ccc solid;
	color:#333;
	height:30px;
}

</style>

<script type="text/javascript">
	function guiZeShowAndhide(){
		if($("#guize").css("display") == "block"){
			$("#guize").hide();
		}else{
			$("#guize").show();
		}
	}
	function tuiGuangerWeiMa(){
		if($("#tuiguangerweima").css("display") == "block"){
			$("#tuiguangerweima").hide();
		}else{
			$("#tuiguangerweima").show();
		}
	}
</script>
</head>
<body>
<div class="gridContainer clearfix" id="myhome">
  <div id="LayoutDiv1" class="LayoutDiv1">
    <header  style="position:relative;">
    <img src="${ctxStatic }/site/themes/default/images/mbg.jpg">
	      <div class="photo">
    		<c:if test="${member.headimgurl eq null}">
    			<img src="${ctxStatic }/site/themes/default/images/headimgDefault.jpg" width="100%">
    		</c:if>
    		<c:if test="${member.headimgurl ne null}">
    			<img src="${member.headimgurl}" width="70px" height="70px">
    		</c:if>
    	  </div>
	      <div class="text">
    		<p style="font-size:20px; font-weight:bold; padding-bottom:16px;">
    			<c:out value="${member.name}" default="${member.nickname}"></c:out>
    		</p>
    		<p  style="font-size:16px; padding-bottom:10px;">
    			${levelName}
    		</p>
      	  </div>
      <div class="jifen">
        <ul>
          <li>
          	<p>活动积分</p>
          	<p class="f13">
          		<c:if test="${member.activeScore eq null}">0</c:if>
          		<c:if test="${member.activeScore ne null}">
          			<c:if test="${member.activeScore eq 0}">0</c:if>
          			<c:if test="${member.activeScore ne 0}">
		          		<fmt:formatNumber value="${member.activeScore/1000}" pattern="##.###"  minFractionDigits="3"/>
          			</c:if>
          		</c:if>
          	</p>
          </li>
          <li>
          	<p>消费积分</p>
          	<p class="f13">
          		<c:if test="${member.consumeScore eq null}">0</c:if>
          		<c:if test="${member.consumeScore ne null}">
          			<c:if test="${member.consumeScore eq 0}">0</c:if>
          			<c:if test="${member.consumeScore ne 0}">
		          		<fmt:formatNumber value="${member.consumeScore/1000}" pattern="##.###"  minFractionDigits="3"/>
          			</c:if>
          		</c:if>
          	</p>
          </li>
          <li style="border-right:0px #999 solid;">
          	<p>信用积分</p>
          	<p class="f13">
          		<c:if test="${member.unusable eq null && member.creditScore eq null}">0</c:if>
          		<c:if test="${member.unusable ne null || member.creditScore ne null}">
          			<c:if test="${(member.creditScore+member.unusable) eq 0}">0</c:if>
          			<c:if test="${(member.creditScore+member.unusable) ne 0}">
		          		<fmt:formatNumber value="${(member.creditScore+member.unusable)/1000}" pattern="##.###"  minFractionDigits="3"/>
          			</c:if>
          		</c:if>
          	</p>
          </li>
        </ul>
      </div>
    </header>
    <section>
      <ul style=" margin-bottom:10px;">
          <li  onclick="javascript:window.location.href='${ctxFront }/site/shopping/orderList?uid=${uid }&wechatId=${wechatId}&status=0'" style="width:27%;"  >待支付</li>
          <li onclick="javascript:window.location.href='${ctxFront }/site/shopping/orderList?uid=${uid }&wechatId=${wechatId}&status=2'" style="width:27%;"  >待收货</li>
          <li  onclick="javascript:window.location.href='${ctxFront }/site/shopping/orderList?uid=${uid }&wechatId=${wechatId}'" style="width:27%;"  >全部订单</li>
      </ul>
	      <div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/orderList?uid=${uid }&wechatId=${wechatId}'" style="padding:3%; height:25px; border-bottom:1px #eee solid;">
		      	<span class="icon_order"  style="font-size:16px;" >&nbsp;&nbsp;全部订单</span>
		      	<span class="icon_href right"></span>
	      </div>
	      <div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/recommendMember?uid=${uid }&wechatId=${wechatId}'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      		<span class="icon_account"  style="font-size:16px;" >&nbsp;&nbsp;我的推荐</span>
	      		<span class="icon_href right"></span>
	      </div>
	      <div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/findMemberScore?uid=${uid }&wechatId=${wechatId}'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      		<span class="icon_jifen"  style="font-size:16px;" >&nbsp;&nbsp;积分记录</span>
	      		<span class="icon_href right"></span>
	      </div>
	      <div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/findMemberScore?uid=${uid }&wechatId=${wechatId}&type=5'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      		<span class="icon_fanlijifen"  style="font-size:16px;" >&nbsp;&nbsp;返利积分</span>
	      		<span class="icon_href right"></span>
	      </div>
	      <div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/findMemberScore?uid=${uid }&wechatId=${wechatId}&type=8'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      		<span class="icon_xinyongjifen"  style="font-size:16px;" >&nbsp;&nbsp;信用积分</span>
	      		<span class="icon_href right"></span>
	      </div>
      	  
	      <div class="clear" onclick="javascript:window.location.href='${ctxFront}/member/myGoods?uid=${uid}&wechatId=${wechatId}'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      		<span class="icon_jingyanzhi"  style="font-size:16px;" >&nbsp;&nbsp;我的物品</span>
	      		<span class="icon_href right"></span>
	      </div>
      	  
	      <div class="clear" onclick="javascript:window.location.href='${ctxFront}/member/toEggsLottery?uid=${uid}&wechatId=${wechatId}'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      		<span class="icon_jingyanzhi"  style="font-size:16px;" >&nbsp;&nbsp;砸金蛋</span>
	      		<span class="icon_href right"></span>
	      </div>
      	  
      	<div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/doUpdatePersonInformation?uid=${uid }&wechatId=${wechatId}'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
      		<span class="icon_address"  style="font-size:16px;" >&nbsp;&nbsp;修改个人资料</span>
      		<span class="icon_href right"></span>
      	</div>
      	
      	<div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/addressList?uid=${uid }&wechatId=${wechatId}'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
      		<span class="icon_address"  style="font-size:16px;" >&nbsp;&nbsp;地址管理</span>
      		<span class="icon_href right"></span>
      	</div>	
      	<%-- 
      	<div class="clear" onclick="javascript:window.location.href='${ctxFront }/site/shopping/toPromote?uid=${uid }&wechatId=${wechatId}'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      	<span class="icon_fanlijifen"  style="font-size:16px;" >&nbsp;&nbsp;我要推广</span>
	      	<span class="icon_href right"></span>
	    </div>
	     --%>
      	<div class="clear" onclick="javascript:window.location.href='http://weixin.zhaotang.net/zt/f/pai/shareman/toShare?uid=73&sid=1'"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      	<span class="icon_woyaotuiguang"  style="font-size:16px;" >&nbsp;&nbsp;我要推广</span>
	      	<span class="icon_href right"></span>
	    </div>
	    
      	<div class="clear" onclick="tuiGuangerWeiMa();" style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      	<span class="icon_woyaotuiguang"  style="font-size:16px;" >&nbsp;&nbsp;推广二维码</span>
	      	<span class="icon_href right"></span>
	    </div>
	    <div id="tuiguangerweima" style="display:none;text-align: center;">
	    	<a href="${ctxFront }/site/shopping/toPromoteQrCode?uid=${uid }&wechatId=${wechatId}&ticket=${member.sceneTicket}">
		    	<img src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=${member.sceneTicket}"  width="50%">
	    	</a><br>
	    	<span>点击图片，分享推广</span><br><br>
	    </div>
      	<div class="clear" onclick="guiZeShowAndhide();"  style="padding:3%; height:25px; border-bottom:1px #eee solid; margin-top:10px;"> 
	      	<span class="icon_guize"  style="font-size:16px;" >&nbsp;&nbsp;积分规则</span>
	      	<span class="icon_href right"></span>
	    </div>
	    <div id="guize" style="display:none;">
	    	<table>
			 	<tr>
			 		<th>会员级别</th>
			 		<th>升级所需积分</th>
			 		<th>返利（%）</th>
			 	</tr>
			 	<c:forEach items="${cbRuleList}" var="carule" end="0">
			 		<tr style="padding-top: 5px;">
			 			<td>${carule.name}</td>
			 			<td>0&sim;<fmt:formatNumber value="${carule.score/1000 }" pattern="#,###.###"  minFractionDigits="3"/></td>
			 			<td>${carule.cashBack }</td>
			 		</tr>
			 	</c:forEach>
			 	<c:forEach items="${cbRuleList}" var="carule" begin="1">
			 		<tr>
			 			<td>${carule.name}</td>
			 			<td>&ge;<fmt:formatNumber value="${carule.score/1000 }" pattern="#,###.###"  minFractionDigits="3"/></td>
			 			<td>${carule.cashBack }</td>
			 		</tr>
			 	</c:forEach>
		 	</table>
	    </div>
    </section>
    <div class="jszch">技术支持：<a href="http://www.hdzhx.com/boxin/index.html" >智讯互联</a></div>     
  </div>
	<jsp:include page="./footer.jsp"></jsp:include>
</div>
</body>
</html>
